package com.chinairi.mall.controller;

import com.chinairi.common.annotation.DoPage;
import com.chinairi.common.controller.BaseController;
import com.chinairi.mall.param.SecondCockpitManageQueryModel;
import com.chinairi.mall.service.ISecondCockpitManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

/**
 * 领导驾驶舱二级前端控制器，包括项目、需求计划、实物订单、服务订单信息查询
 * @author 李昌赐
 * @since 2020−12-02
 */
@Api("领导驾驶舱二级")
@RequestMapping("second-cockpit-manage")
@RestController
public class SecondCockpitManageController extends BaseController {

    private static final long serialVersionUID = -1069710865120761382L;

    @Autowired
    private ISecondCockpitManageService secondCockpitManageService ;

    @ApiOperation("项目信息查询")
    @ApiImplicitParam(name = "secondCockpitManageQueryModel",value = "查询参数",dataType = "SecondCockpitManageQueryModel",required = true,paramType = "query")
    @GetMapping("listProject")
    @DoPage
    public List<Map<String, Object>> listProject(SecondCockpitManageQueryModel secondCockpitManageQueryModel) {
        return secondCockpitManageService.listProject(secondCockpitManageQueryModel);
    }

    @ApiOperation("项目的需求计划信息查询")
    @ApiImplicitParam(name = "secondCockpitManageQueryModel",value = "查询参数",dataType = "SecondCockpitManageQueryModel",required = true,paramType = "query")
    @DoPage
    @GetMapping("listProjectPlanReq")
    public List<Map<String, Object>> listProjectPlanReq(SecondCockpitManageQueryModel secondCockpitManageQueryModel) {
        return secondCockpitManageService.listProjectPlanReq(secondCockpitManageQueryModel);
    }

    @ApiOperation("需求计划的实物订单信息查询")
    @ApiImplicitParam(name = "secondCockpitManageQueryModel",value = "查询参数",dataType = "SecondCockpitManageQueryModel",required = true,paramType = "query")
    @DoPage
    @GetMapping("listGoodsOrder")
    public List<Map<String, Object>> listGoodsOrder(SecondCockpitManageQueryModel secondCockpitManageQueryModel) {
        return secondCockpitManageService.listGoodsOrder(secondCockpitManageQueryModel);
    }

    @ApiOperation("实物订单的服务订单信息查询")
    @ApiImplicitParam(name = "secondCockpitManageQueryModel",value = "查询参数",dataType = "SecondCockpitManageQueryModel",required = true,paramType = "query")
    @DoPage
    @GetMapping("listServiceOrder")
    public List<Map<String, Object>> listServiceOrder(SecondCockpitManageQueryModel secondCockpitManageQueryModel) {
        return secondCockpitManageService.listServiceOrder(secondCockpitManageQueryModel);
    }
}
